<!DOCTYPE html>
<html
	dir="{{  with .Language.LanguageDirection }}{{ . }}{{ else }}ltr{{ end }}"
	lang="{{ if and $.Site.LanguageCode (not .Page.Params.untranslated) }}{{ $.Site.LanguageCode }}{{ else }}en-US{{ end }}">

	{{/* For untranslated page, we use the English header. */}}
	{{ if .Page.Params.untranslated }}
		{{ range .Page.Translations }}
			{{ if eq "en" .Language.Lang }}
				{{ partial "head" . }}
			{{ end }}
		{{ end }}
	{{ else }}
		{{ partial "head" . }}
	{{ end }}
	<body>
		{{ partial "header" . }}
		{{ block "main" . }}{{ end }}
		{{ partial "footer" . }}
	</body>
</html>
